home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / text / cmanual.lzh / ACM2.lzh / HintsAndTips / Example4.c < prev    next >
C/C++ Source or Header  |  1991-01-27  |  482b  |  24 lines

  1. /* Example 4                                              */
  2. /* This program tells you if it was run from workbench or */
  3. /* from a CLI window.                                     */
  4.  
  5. void main();
  6.  
  7. void main( argc, argv )
  8. int argc;
  9. char *argv[];
  10. {
  11.   int loop;
  12.  
  13.  
  14.   if( argc )
  15.     printf( "This program was started from a CLI window!\n" );
  16.   else
  17.     printf( "This program was started from Workbench!\n" );
  18.  
  19.  
  20.   /* Wait for a while: */
  21.   for( loop = 0; loop < 500000; loop++ )
  22.     ;
  23. }
  24.